﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 库存调整
    /// </summary>
    [Table("T_InventoryAdjust")]
    public class InventoryAdjust:BaseEntity
    {
        /// <summary>
        /// 单据号
        /// </summary>
        [MaxLength(60)]
        public string BillSN
        {
            get;
            set;
        }

        /// <summary>
        /// 来源单据类型：0-无；10-盘点单；20-手工创建；
        /// </summary>
        public int? SourceType
        {
            get;
            set;
        }

        /// <summary>
        /// 来源单据号
        /// </summary>
        [MaxLength(60)]
        public string SourceSN
        {
            get;
            set;
        }

        /// <summary>
        /// 仓库Id
        /// </summary>
        public long? WhId
        {
            get;
            set;
        }

        /// <summary>
        /// 库房名称
        /// </summary>
        [MaxLength(60)]
        public string WhName
        {
            get;
            set;
        }

        /// <summary>
        /// 库区Id
        /// </summary>
        public long? AreaId
        {
            get;
            set;
        }

        /// <summary>
        /// 库区名称
        /// </summary>
        [MaxLength(60)]
        public string AreaName
        {
            get;
            set;
        }

        /// <summary>
        /// 仓位Id
        /// </summary>
        public long? LocationId
        {
            get;
            set;
        }

        /// <summary>
        /// 仓位编码
        /// </summary>
        [MaxLength(60)]
        public string LocationCode
        {
            get;
            set;
        }

        /// <summary>
        /// 托盘条码
        /// </summary>
        [MaxLength(60)]
        public string PalletBarcode
        {
            get;
            set;
        }

        /// <summary>
        /// 物料Id
        /// </summary>
        public long? MaterialId
        {
            get;
            set;
        }

        /// <summary>
        /// 物料号
        /// </summary>
        [MaxLength(60)]
        public string MaterialCode
        {
            get;
            set;
        }

        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(60)]
        public string MaterialName
        {
            get;
            set;
        }
        /// <summary>
        /// 库存Id
        /// </summary>
        public long InventoryId { get; set; }
        /// <summary>
        /// 调整数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? Qty
        {
            get;
            set;
        }

        /// <summary>
        /// 状态：0-创建；10-已审核；20-已调整；30-取消作废；
        /// </summary>
        public int? Status
        {
            get;
            set;
        }

        /// <summary>
        /// 调整原因
        /// </summary>
        [MaxLength(50)]
        public string Reason
        {
            get;
            set;
        }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(60)]
        public string Remark
        {
            get;
            set;
        }

        /// <summary>
        /// 盘点报告Id
        /// </summary>
        public int? StocktakeResultId
        {
            get; set;
        }
    }
}
